/*
 *    Copyright (c) 2018-2025, cloud All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the pig4cloud.com developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: cloud
 */

package com.fuyao.cloud.personnel.api.vo.excel;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentStyle;
import com.alibaba.excel.annotation.write.style.HeadStyle;
import com.alibaba.excel.enums.BooleanEnum;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDate;

/**
 * 整改反馈
 *
 * @author pigx code generator
 * @date 2022-04-26 10:13:54
 */
@Data
@ApiModel(value = "整改反馈导出VO")
public class ProblemFeedbackExportVO  {

    private static final long serialVersionUID = 1L;

    @HeadStyle
    @ColumnWidth(20)
    @ExcelProperty(value="整改措施单号",index = 0)
    @ApiModelProperty(value="整改措施单号")
    private String rectifyNum;

    @ExcelIgnore
    @ApiModelProperty(value="状态默认为0{0：草稿、1：已提交}")
    private Integer status;

    @HeadStyle
    @ColumnWidth(10)
    @ExcelProperty(value="状态",index = 1)
    @TableField(exist = false)
    private String statusCn;

    @HeadStyle
    @ColumnWidth(12)
    @ExcelProperty(value="提交时间",index = 2)
    @ApiModelProperty(value="提交时间")
    private LocalDate submitDate;

    @HeadStyle
    @ColumnWidth(40)
    @ContentStyle(wrapped = BooleanEnum.TRUE)
    @ExcelProperty(value="描述",index = 3)
    @ApiModelProperty(value="描述")
    private String describeText;

    @HeadStyle
    @ColumnWidth(40)
    @ContentStyle(wrapped = BooleanEnum.TRUE)
    @ExcelProperty(value="备注",index = 4)
    @ApiModelProperty(value="备注")
    private String remarks;

    public String getStatusCn() {
        return 0 == this.status?"草稿":"已提交";
    }
}
